<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <a href="https://github.com/AlloyTeam/omi" target="_blank" style="position: absolute; right: 0; top: 0;">
        <img src="../../asset/github.png" alt="" />
    </a>
    <script src="../../dist/omi.lite.js"></script>
    <script src="../artTemplate/template.js"></script>
    <script>
        Omi.template = function(tpl, data){
            return template.compile(tpl)(data);
        }

        var List =  Omi.create("List",{
            style:function () {
                return 'h3 { color:red; }\
                button{ color:green;}';
            },
            render:function(){
                return '<h1>{{title}}</h1>\
                            <ul>\
                            {{each list as value i}}\
                        <li>索引2 {{i + 1}} ：{{value}}</li>\
                        {{/each}}\
                        </ul>';
        }
        })

        Omi.render(new List( {
            title: '标签',
            list: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']
        }),'body');
    </script>
</body>
</html>